package org.fastsyncer.common.entity;

import java.util.Map;

public class ScheduleJob {
	
	/** 任务ID **/
	private String jobId;

	/** 任务分组,默认为系统工作组 **/
	private String jobGroup = "SystemWorkGroup";

	/** 任务运行时间表达式 **/
	private String cronExpression;
	
	/** 运行的class类 **/
	@SuppressWarnings("rawtypes")
	private Class jobClass;
	
	/** 参数 **/
	private Map<String, Object> data;

	public String getJobId() {
		return jobId;
	}

	public ScheduleJob setJobId(String jobId) {
		this.jobId = jobId;
		return this;
	}

	public String getJobGroup() {
		return jobGroup;
	}

	public ScheduleJob setJobGroup(String jobGroup) {
		this.jobGroup = jobGroup;
		return this;
	}

	public String getCronExpression() {
		return cronExpression;
	}

	public ScheduleJob setCronExpression(String cronExpression) {
		this.cronExpression = cronExpression;
		return this;
	}

	@SuppressWarnings("rawtypes")
	public Class getJobClass() {
		return jobClass;
	}

	public <Job> ScheduleJob setJobClass(Class <? extends Job> jobClass) {
		this.jobClass = jobClass;
		return this;
	}

    public Map<String, Object> getData() {
        return data;
    }

    public <Job> ScheduleJob setData(Map<String, Object> data) {
        this.data = data;
        return this;
    }

}